/**
 * @author Flávia Veloso Queiroz
 */

package app;

import cinema.Episodio;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;
import cinema.Operacoes;
import java.util.ArrayList;
import java.util.List;


public class TelaQuente 
{
    private static Episodio [] episodios;
     
    public static void main(String[] args) throws MalformedURLException, IOException
    {
            
       // episodios = Operacoes.autoRepresentacao(args[0], args[1]);
 
        List<String> generos = new ArrayList<>();           
        int id= 300;
        URL url = new URL("http://api.themoviedb.org/3/movie/" + id + "?api_key="
                + "2c179255fe73cce70fbf10d27856228d");
        Scanner scanner = new Scanner(url.openStream());
        String infoFilme = new String();
        
        while (scanner.hasNext())
        {
            infoFilme += scanner.nextLine();
        }
        
        scanner.close();
        
        System.out.println(infoFilme);
        
        String genero = "";
        
        genero = infoFilme.substring(infoFilme.indexOf("genres")+6,
                infoFilme.indexOf("homepage",infoFilme.indexOf("genres")+6));
        
       
        
     
            
    }   
  
}
